﻿<navigation:Page 
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
           xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" x:Class="B2B.Views.SiparisListesi"
           xmlns:src="clr-namespace:B2B.Extensions" xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"
           mc:Ignorable="d"
           d:DesignWidth="640" d:DesignHeight="480" Width="1024" Height="800"
           Title="SiparisListesi Page">
    <UserControl.Resources>
        <src:DateConverter x:Name="FormatConverter"/>
    </UserControl.Resources>
    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="35"/>
            <RowDefinition Height="80"/>
            <RowDefinition Height="350"/>
            <RowDefinition Height="75"/>
            <RowDefinition Height="120"/>
        </Grid.RowDefinitions>
        <Border BorderBrush="Black" BorderThickness="1" Margin="2,0" CornerRadius="5">
            <Border.Background>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#FFB3493B" Offset="0"/>
                    <GradientStop Color="#FF871B20" Offset="1"/>
                </LinearGradientBrush>
            </Border.Background>
            <TextBlock HorizontalAlignment="Left" Margin="10,0,0,0" TextWrapping="Wrap" Text="Sipariş Listesi" VerticalAlignment="Center" Foreground="White" FontFamily="Tahoma" FontSize="21.333"/>
        </Border>
        <Border BorderBrush="Black" BorderThickness="1" Margin="2,5" Grid.Row="1" CornerRadius="10" Background="#FFAFAFAF">
            <Grid Margin="0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="0.002*"/>
                    <ColumnDefinition Width="0.101*"/>
                    <ColumnDefinition Width="0.16*"/>
                    <ColumnDefinition Width="0.104*"/>
                    <ColumnDefinition Width="0.181*"/>
                    <ColumnDefinition Width="0.057*"/>
                    <ColumnDefinition Width="0.395*"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="0.494*"/>
                    <RowDefinition Height="0.506*"/>
                </Grid.RowDefinitions>
                <sdk:DatePicker x:Name="dteBaslangic" Margin="4,3,0,3" Grid.Column="2" VerticalAlignment="Center"/>
                <sdk:DatePicker x:Name="dteBitis" Margin="4,3,0,3" Grid.Row="1" Grid.Column="2" VerticalAlignment="Center"/>
                <TextBlock Grid.Column="1" Margin="0" TextWrapping="Wrap" VerticalAlignment="Center" HorizontalAlignment="Right"><Run Text="Başlangıç Tarihi"/><Run Text=" :"/></TextBlock>
                <TextBlock Grid.Column="1" Margin="0" TextWrapping="Wrap" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Right" Text="Bitiş Tarihi :"/>
                <TextBlock Grid.Column="3" Margin="0,8,5,5" TextWrapping="Wrap" HorizontalAlignment="Right" d:LayoutOverrides="Height" Text="Sipariş No :"/>
                <TextBlock Grid.Column="3" Margin="0,8,8,5" TextWrapping="Wrap" HorizontalAlignment="Right" Text="Durum :" Grid.Row="1" d:LayoutOverrides="Height"/>
                <TextBox x:Name="txtSiparisNo" Grid.Column="4" Margin="4,3" TextWrapping="Wrap"/>
                <ComboBox x:Name="cmbDurum" Grid.Column="4" Margin="4,3" Grid.Row="1" d:LayoutOverrides="Height">
                    <ComboBoxItem Content="Onaylı"/>
                    <ComboBoxItem Content="Onaylanmamış"/>
                    <ComboBoxItem Content="Tümü"/>
                </ComboBox>
                <Button x:Name="btnAra" Content="Ara" Grid.Column="5" Margin="4,3"/>
            </Grid>
        </Border>
        <Border BorderBrush="Black" BorderThickness="1" Margin="2" Grid.Row="2" CornerRadius="10" Background="#FFFEFEFE">
            <sdk:DataGrid x:Name="grdListe" Margin="4" BorderBrush="{x:Null}" AutoGenerateColumns="False" >
                <sdk:DataGrid.Columns>
                    <sdk:DataGridCheckBoxColumn Binding="{Binding Sec}" Width="30"/>
                    <sdk:DataGridTextColumn Binding="{Binding Tarih, StringFormat=dd/MM/yyyy}" IsReadOnly="True" Width="100" Header="Tarih"/>
                    <sdk:DataGridTextColumn Binding="{Binding Seri}" IsReadOnly="True" Width="50" Header="Seri"/>
                    <sdk:DataGridTextColumn Binding="{Binding Sira}" IsReadOnly="True" Width="50" Header="Sira"/>
                    <sdk:DataGridTextColumn Binding="{Binding Kullanici}" IsReadOnly="True" Width="200" Header="Sipariş Veren"/>
                    <sdk:DataGridTextColumn Binding="{Binding Tutar}" IsReadOnly="True" Width="100" Header="Tutar"/>
                    <sdk:DataGridTextColumn Binding="{Binding Durum}" IsReadOnly="True" Width="100" Header="Durum"/>

                    <sdk:DataGridTemplateColumn Width="50">
                        <sdk:DataGridTemplateColumn.CellTemplate>
                            <DataTemplate>
                                <Button Tag="{Binding}" Content="Detay" Click="SiparisDetayi" ></Button>
                            </DataTemplate>
                        </sdk:DataGridTemplateColumn.CellTemplate>
                    </sdk:DataGridTemplateColumn>

                </sdk:DataGrid.Columns>
            </sdk:DataGrid>
        </Border>
        <Border BorderBrush="Black" BorderThickness="1" Margin="4" Grid.Row="3" CornerRadius="10" Background="#FFAEAEAE">
            <Grid Margin="4">
                <Button x:Name="btnSecimiSil" Content="Seçimi Sil" HorizontalAlignment="Right" Height="35" Margin="0,8,205,0" VerticalAlignment="Top" Width="132" FontFamily="Tahoma" FontSize="16"/>
                <Button x:Name="btnSecilenleriOnayla" Content="Seçilenleri Onayla" HorizontalAlignment="Right" Height="35" Margin="0,8,10,0" VerticalAlignment="Top" Width="191" FontFamily="Tahoma" FontSize="16"/>
            </Grid>
        </Border>
        <toolkit:BusyIndicator BusyContent="Lütfen bekleyiniz..." Grid.Column="1" Grid.Row="2" x:Name="bsyIndic" HorizontalAlignment="Center" VerticalAlignment="Center" IsBusy="False"/>
    </Grid>
</navigation:Page>
